package com.zl.customer.service;/**
 * @author suke
 * @create 2021-07-09 11:51
 */

import com.zl.customer.pojo.Customer;
import com.zl.customer.pojo.CustomerCondition;
import com.zl.customer.pojo.Page;

import java.util.List;

/**
 * TODO
 * @InterfaceName: CustomerService
 * @author: suke
 * @since: 2021/7/9 11:51
 */
public interface CustomerService {
    public List<Customer> queryAll();

    /**
     * 添加客户
     * @param customer
     * @return
     */
    int addCustomer(Customer customer);

    /**
     * 删除客户
     * @param id
     * @return
     */
    int deleteById(int id) throws Exception;

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    Customer queryOne(int id);

    /**
     * 分页查询
     * @param pageIndex 当前页
     * @param pageSize  页容量
     * @return 当前页的实体对象
     */
    Page<Customer> queryByPage(int pageIndex, int pageSize);

    /**
     * 高级查询带分页
     * @param condition  条件类
     * @return
     */
    Page<Customer> queryCondition(CustomerCondition condition);
}
